<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel backend\models\search\User */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '用户列表';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-index">

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        //'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'id',
            'name',
//            'header',
//            'access_token',
//            'unionid',
            // 'token_expire',
             'award_num',
             'bet_num',
             'bet_win',
            [
                'attribute'=>'is_apply',
                'value'=>function($model){
                    return $model->is_apply == 1 ? '已申请' : '<font color="red">未申请</font>';
                },
                'label' => '是否申请领奖',
                'format' => 'raw'
            ],
            // 'status',

            ['class' => 'yii\grid\ActionColumn',
                'template' => '{view}',
                'header' => '操作',
            ],

        ],
    ]); ?>
</div>
